beginoutdoorscript;

variables;
short choice;

body;

beginstate INIT_STATE;
break;

beginstate START_STATE;
break;

beginstate 10;
	if(get_flag(1,20) <= 0){
		reset_dialog();
		add_dialog_str(0,"You spot an immense group of Ogres milling about... singing?  How odd.",0);
		add_dialog_str(1,"Unfortunately, the Ogres immediately spot and surround you.  You draw your weapons.",0);
		add_dialog_str(2,"_WAIT,_ screams one of the Ogres.  _Please, don't attack us.  We are but a merry band of Ogres who simply want to prove that we are not all bloodthirsty brutes!",0);
		add_dialog_str(3,"Please, let us show you what we mean.  Commence group hug!_",0);
		add_dialog_str(4,"They obviously seem sincere, but do you oblige?",0);
		add_dialog_choice(0,"Yeah sure, what the heck.");
		add_dialog_choice(1,"Hell no! (Slay them all.)");
		choice = run_dialog(1);

		if(choice == 2){
			message_dialog("You charge the advancing hug and slay the unarmed Ogres.","Another days work.");
			outdoor_enc_result(3);
			inc_flag(10,10,1);
			}
			else{
				message_dialog("Making sure no one is around to see you, you join in the group hug.  It's strangely heart warming.","The Ogres trot away and begin singing again.");
				outdoor_enc_result(3);
				}
	set_flag(1,20,1);
		}
break;
beginstate 11; //exit scenario
	if(get_flag(3,10) <= 0){
		reset_dialog();
		add_dialog_str(0,"This is the only exit out of Nowhere Special.",0);
		add_dialog_str(1,"Leave now?",0);
		add_dialog_choice(0,"No, The Boss is counting on me!");
		add_dialog_choice(1,"Yes, I prefer vagrancy to a high-risk, high-pay career.");
		choice = run_dialog(0);

		if(choice == 2){
			message_dialog("You decide to leave before completing the mission.  As a result, your bad dude reputation plummets and you never find work again.","You starve to death two days later.");
			end_scenario(0);
			}
			else{
				block_entry(1);
				}
		}

	if((get_flag(3,10) >= 1) && (get_flag(1,15) <= 0)){
		reset_dialog();
		add_dialog_str(0,"This is the only exit out of Nowhere Special.",0);
		add_dialog_str(1,"Leave now, before getting your reward?",0);
		add_dialog_choice(0,"No, I like being paid for my work.");
		add_dialog_choice(1,"Yes, killing is it's own reward.");
		choice = run_dialog(0);

		if(choice == 2){
			message_dialog("You decide to leave before getting your reward.  As a result, you don't have enough money to pay the infamous and powerful bandits who rob you on your way home, and wind up serving in their brothel.","");
			end_scenario(1);
			}
			else{
				block_entry(1);
				}
		}

	if((get_flag(3,10) >= 1) && (get_flag(1,15) == 1)){
		reset_dialog();
		add_dialog_str(0,"This is the only exit out of Nowhere Special.",0);
		add_dialog_str(1,"Leave now?",0);
		add_dialog_choice(0,"No.");
		add_dialog_choice(1,"Yes, I'm tired of this place.");
		choice = run_dialog(0);

		if(choice == 2){
			if(get_flag(10,10) <= 3){
				message_dialog("Having completed your mission you decide to return home.  Though you weren't paid well, you learned something about yourself through the events that took place.","");
				if(get_flag(1,16) == 1){
					message_dialog("SCENARIO RATING: TOTAL WHIMP!","You are the opposite of a bad dude and probably get pushed around all the time.  As you are walking home a little kid kicks you in the nads and steals your five gold.");
					message_dialog("  As your reputation sucks, you wind up having to pay people to hire you for work.","You die of starvation two days later.");
					change_coins(-5);
					}
					else{
						message_dialog("SCENARIO RATING: TOTAL WHIMP!","You are the opposite of a bad dude and probably get pushed around all the time.  As you are walking home a little kid kicks you in the nads and steals all of your money.");
						message_dialog("As your reputation sucks, you wind up having to pay people to hire you for work.","You die of starvation two days later.");
						change_coins(-1 * (coins_amount()));
						}
				}

			if((get_flag(10,10) >= 4) && (get_flag(10,10) <= 6)){
				message_dialog("Having completed your mission you decide to return home.  Though you weren't paid well, you learned something about yourself through the events that took place.","");
				message_dialog("SCENARIO RATING: PLAIN DUDE!","You are a dude, but not a bad dude.  Your rep doesn't increase and you have a hard time finding other work.");
				change_coins(100);
				}

			if((get_flag(10,10) >= 7) && (get_flag(10,10) <= 8)){
				message_dialog("Having completed your mission you decide to return home.  Though you weren't paid well, you learned something about yourself through the events that took place.","");
				message_dialog("SCENARIO RATING: SEMI-BAD DUDE!","You are almost a bad dude, but you have a soft side to your heart which fails you.  Your reputation stays good and you make some good money from work.");
				change_coins(600);
				}

			if(get_flag(10,10) == 9){
				message_dialog("Having completed your mission you decide to return home.  Though you weren't paid well, you learned something about yourself through the events that took place.","");
				message_dialog("SCENARIO RATING: BAD DUDE!","Congratulations, you are completely 100% a bad dude.  Your bad dude reputation skyrockets and people literally throw money at you to do even the simplest of tasks for them.");
				change_coins(1000);
				}

			end_scenario(1);
			}
			else{
				block_entry(1);
				}
		}
break;
beginstate 12;
	if(get_flag(3,10) >= 1){
		print_str("No need to go back in there.");
		block_entry(1);
		}
break;